<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">加入社群</block>
		</cu-custom>
		<view class="margin-top-xl padding-xl uni-column bg-white solid-bottom solid-top radius" v-if="channel!=null">
			<view class="text-center text-df padding-left-lg margin-top-xl">QQ: {{channel.qq}}</view>
			<view class="text-center text-df padding-left-lg margin-top-xl">WeiXin: {{channel.wx}}</view>
			<view class="text-center text-df padding-left-lg margin-top-xl">Telegram: {{channel.telegram}}</view>
		</view>
	</view>
</template>

<script>
	var _self
	export default {
		data() {
			return {
				channel:null,
				channelName:'channel'
			}
		},
		onLoad() {
			_self=this
			_self.getChannelInfo()
		},
		methods: {
			getChannelInfo(){
				console.log('get channel info '+_self.getChannel())
				uni.request({
					url: this.api+'/channels/info?channelName='+_self.getChannel(),
					method: 'GET',				
					success: res => {
						console.log('get channel info')
						console.log(res.data)
						_self.channel=res.data.data
					}				
				});
			}
		}
	}
</script>

<style>

</style>
